﻿<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;">
<head runat="server">
    <title>RiaCrm.Shell</title>
</head>
<body style="height:100%;margin:0;">
    <form id="form1" runat="server" style="height:100%;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div  style="height:100%;">
            <asp:Silverlight ID="Xaml1" 
                             runat="server" 
                             Source="~/ClientBin/RiaCrm.Shell.xap" 
                             MinimumVersion="2.0.31005.0" 
                             Width="100%" 
                             Height="100%" />
        </div>
        <script runat="server">
             
            protected void Page_Load(object sender, EventArgs e)
            {
                foreach (var key in this.Request.Params.Keys)
                {
                    if (key.ToString().ToLower() == "entity")
                        this.Xaml1.InitParameters += ", entity=" + this.Request.Params["entity"].Substring(0, this.Request.Params["entity"].Length);
                    if(key.ToString().ToLower() == "organame")
                        this.Xaml1.InitParameters += ", organame=" + this.Request.Params["organame"].Substring(0, this.Request.Params["organame"].Length);
                    
                }
                
                
                
            }
             
        </script>
    </form>
</body>
</html>